package com.intco.ait.quotation.api.infrastructure.mybatis.entity;

import com.alibaba.fastjson2.JSON;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.Date;
import java.util.List;

@Data
@TableName("bom_template")
public class BomTemplateDo {

    private Long id;

    private Integer classId;

    private String className;

    private String productType;

    private String invCode;

    private String name;

    private String bomType;

    private List<Long> attributeDetailId;

    private Long feeDetailId;

    private Date insertTime;

    private Date updateTime;

    public void setAttributeDetailId(String attributeDetailId) {
        this.attributeDetailId = JSON.parseArray(attributeDetailId, Long.class);
    }

    public String getAttributeDetailId() {
        return JSON.toJSONString(this.attributeDetailId);
    }
}
